/**
 * $Id$
 * Copyright 2011-2014 Oak Pacific Interactive. All rights reserved.
 */
package com.malphi.framework.core.xmlconfig;

import com.malphi.framework.core.xmlconfig.impl.MemCacheConfig;


/**
 * @author <a href="mailto:ruofei.ma@renren-inc.com">ma ruofei</a>
 * @version 1.0 2011-11-22 上午10:55:34
 * @since 1.0
 */
public enum Config {
    
    MEMCACHE_CONFIG("memcached.xml",MemCacheConfig.class);
    
    public static final String CONFIG_PATH = ClassLoader.getSystemResource("").getPath();
    
    private final String xmlFile ;
    private final Class<? extends XmlConfig> clazz;
    
    private Config(String xmlFile,Class<? extends XmlConfig> clazz){
        this.xmlFile = xmlFile;
        this.clazz = clazz;
    }

    public String getXmlFile() {
        return xmlFile;
    }
    public Class<? extends XmlConfig> getConfigClass() {
        return clazz;
    }
    
    public static void main(String[] args) {
        System.out.println(Config.valueOf(MEMCACHE_CONFIG.name()));
        
    }
}
